﻿using System;

namespace MuYue.ORM.Attributes
{
    /// <summary>
    /// 字段键的约束
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class KeyAttribute : Attribute
    {
        /// <summary>
        /// 数据库中映射的数据类型
        /// </summary>
        public string DbTypeName { set; get; }

        /// <summary>
        /// 字段的约束信息
        /// </summary>
        public string Constraint { set; get; }

        /// <summary>
        /// 是否是自动增长的字段
        /// </summary>
        public bool AutoIncrement { set; get; }

        /// <summary>
        /// 别名属性
        /// </summary>
        public string Alias { set; get; }
    }
}
